﻿@using DeliveryPlus.Web.Classes.Ext
@model DeliveryPlus.Web.DAL.Entities.Article

@{
    ViewBag.Title = "Раздел \"О доставке\"";
    Layout = "../Shared/ControlPanelLayout.cshtml";
}

<form role="form" id="article-form" action="/ControlPanel/ManageAboutDelivery/Save" method="POST" enctype="multipart/form-data">
    @Html.HiddenFor(m => m.Id)
    <div class="form-group">
        <label for="news-content-field">Содержание раздела "О доставке"</label>
        <textarea class="form-control" name="Content" placeholder="Введите содержимое раздела (можно использовать HTML разметку)" id="news-content-field" style="height: 550px">@Model.Content</textarea>
    </div>
    <button type="submit" class="btn btn-default">Сохранить</button>
</form>
<script type="text/javascript">
    $(document).ready(function() {
        $("#article-form").validate({            
           rules: {
               Title: {
                   required: true,
                   maxlength: 255,
               },
               Annotation: {
                   required: false,
                   maxlength: 1000,
               },
               Content: {
                   required: true
               },
               PublicationDate: {
                   required: true,
               }
           } 
        });
    });
</script>
